package com.stylefeng.guns.common.persistence.model;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 奖券表
 * </p>
 *
 * @author ruiyifeng123
 * @since 2018-04-20
 */
@TableName("wz_coupon")
public class WzCoupon extends Model<WzCoupon> {

    private static final long serialVersionUID = 1L;

    /**
     * 优惠券id
     */
    @TableId(value = "coupon_id", type = IdType.AUTO)
    private Long couponId;
    /**
     * 标题
     */
    private String title;
    /**
     * 副标题
     */
    private String subtitle;
    /**
     * 封面图片url
     */
    @TableField("cover_url")
    private String coverUrl;
    /**
     * 用户编号
     */
    @TableField("user_code")
    private String userCode;
    /**
     * 用户信息id
     */
    @TableField("user_info_id")
    private Long userInfoId;
    /**
     * 开始时间
     */
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @TableField("begin_time")
    private Date beginTime;
    /**
     * 结束时间
     */
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @TableField("end_time")
    private Date endTime;
    /**
     * 库存
     */
    private Integer stock;
    /**
     * 数量
     */
    private Integer quantity;
    /**
     * 备注
     */
    private String remark;
    /**
     * 详细备注
     */
    private String subremark;
    /**
     * 广告id
     */
    @TableField("adv_id")
    private Long advId;
    /**
     * 奖品id
     */
    @TableField("prize_id")
    private Long prizeId;
    /**
     * 类型：1-抽奖券；2-商家优惠券
     */
    private Integer type;
    /**
     * 子类型：1-抵扣券；2-折扣券
     */
    private Integer subtype;
    /**
     * 二维码图片
     */
    @TableField("qr_code_url")
    private String qrCodeUrl;
    /**
     * 状态：1-待使用；2-使用中；3-审核中；4-发布中；5-下架；
     */
    private Integer status;
    /**
     * 创建时间
     */
    @TableField("create_time")
    private Date createTime;
    /**
     * 后台修改人id
     */
    @TableField("modifier_id")
    private Integer modifierId;
    /**
     * 修改时间
     */
    @TableField("update_time")
    private Date updateTime;


    public Long getCouponId() {
        return couponId;
    }

    public void setCouponId(Long couponId) {
        this.couponId = couponId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getSubtitle() {
        return subtitle;
    }

    public void setSubtitle(String subtitle) {
        this.subtitle = subtitle;
    }

    public String getCoverUrl() {
        return coverUrl;
    }

    public void setCoverUrl(String coverUrl) {
        this.coverUrl = coverUrl;
    }

    public String getUserCode() {
        return userCode;
    }

    public void setUserCode(String userCode) {
        this.userCode = userCode;
    }

    public Long getUserInfoId() {
        return userInfoId;
    }

    public void setUserInfoId(Long userInfoId) {
        this.userInfoId = userInfoId;
    }

    public Date getBeginTime() {
        return beginTime;
    }

    public void setBeginTime(Date beginTime) {
        this.beginTime = beginTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public Integer getStock() {
        return stock;
    }

    public void setStock(Integer stock) {
        this.stock = stock;
    }

    public Integer getQuantity() {
        return quantity;
    }

    public void setQuantity(Integer quantity) {
        this.quantity = quantity;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getSubremark() {
        return subremark;
    }

    public void setSubremark(String subremark) {
        this.subremark = subremark;
    }

    public Long getAdvId() {
        return advId;
    }

    public void setAdvId(Long advId) {
        this.advId = advId;
    }

    public Long getPrizeId() {
        return prizeId;
    }

    public void setPrizeId(Long prizeId) {
        this.prizeId = prizeId;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getSubtype() {
        return subtype;
    }

    public void setSubtype(Integer subtype) {
        this.subtype = subtype;
    }

    public String getQrCodeUrl() {
        return qrCodeUrl;
    }

    public void setQrCodeUrl(String qrCodeUrl) {
        this.qrCodeUrl = qrCodeUrl;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getModifierId() {
        return modifierId;
    }

    public void setModifierId(Integer modifierId) {
        this.modifierId = modifierId;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    protected Serializable pkVal() {
        return this.couponId;
    }

    @Override
    public String toString() {
        return "WzCoupon{" +
        "couponId=" + couponId +
        ", title=" + title +
        ", subtitle=" + subtitle +
        ", coverUrl=" + coverUrl +
        ", userCode=" + userCode +
        ", userInfoId=" + userInfoId +
        ", beginTime=" + beginTime +
        ", endTime=" + endTime +
        ", stock=" + stock +
        ", quantity=" + quantity +
        ", remark=" + remark +
        ", subremark=" + subremark +
        ", advId=" + advId +
        ", prizeId=" + prizeId +
        ", type=" + type +
        ", subtype=" + subtype +
        ", qrCodeUrl=" + qrCodeUrl +
        ", status=" + status +
        ", createTime=" + createTime +
        ", modifierId=" + modifierId +
        ", updateTime=" + updateTime +
        "}";
    }
}
